/**
 * 
 */
Ext.define('AM.view.DeptList',{
	extend:'Ext.grid.Panel',
	alias:'widget.deptlist',
	//store:'deptStore',
	store:Ext.create('AM.store.deptStore'),
	selModel:{
		selType:'checkboxmodel'
	},
	multiSelect:true,
	enableKeyNav:true,
	columnLines:true,
	tbar:[
		{text:'添加',id:'add',iconCls:'Add'},'-',
		{text:'删除',id:'delete',iconCls:'Delete'},'-',
		{text:'保存',id:'save',iconCls:'Tablesave'}
	],
	dockedItems:[{
		xtype:'pagingtoolbar',
		store:Ext.create('AM.store.deptStore'),
		displayInfo:true,
		dock:'bottom'
	}],
	columns:[
		{header:'部门名称',dataIndex:'text',field:{xtype:'textfield',allowBlank: false}},
		{header:'部门经理',dataIndex:'manager',field:{xtype:'textfield',allowBlank: false}},
		{header:'顺序简介',dataIndex:'orderIndex'},
		{header:'职能简介',dataIndex:'info',flex:1},
		{header:'ID',dataIndex:'id',hidden:true}
	],
	initComponent:function(){
		this.editing = Ext.create('Ext.grid.plugin.CellEditing');
		this.plugins = [this.editing];
		this.callParent(arguments);
	}
});